home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / wg_lib / scrfrm.frm < prev    next >
Text File  |  1995-09-06  |  4KB  |  139 lines

  1. VERSION 2.00
  2. Begin Form scrfrm 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Scroll Bars and Meter"
  5.    ClientHeight    =   3825
  6.    ClientLeft      =   2025
  7.    ClientTop       =   1725
  8.    ClientWidth     =   5550
  9.    Height          =   4230
  10.    Left            =   1965
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form3"
  13.    ScaleHeight     =   3825
  14.    ScaleWidth      =   5550
  15.    Top             =   1380
  16.    Width           =   5670
  17.    Begin EHScroll1 EHScroll1 
  18.       Height          =   300
  19.       LargeChange     =   100
  20.       Left            =   660
  21.       Max             =   32767
  22.       Min             =   1
  23.       SmallChange     =   50
  24.       Top             =   3195
  25.       Value           =   1
  26.       Width           =   3825
  27.    End
  28.    Begin Meter1 Meter 
  29.       BackColor       =   &H00FFFFFF&
  30.       ForeColor       =   &H000000FF&
  31.       Height          =   330
  32.       Index           =   2
  33.       Inverse         =   -1  'True
  34.       Left            =   630
  35.       Silent          =   0   'False
  36.       Top             =   2550
  37.       UnitsDone       =   0
  38.       UnitsTotal      =   32767
  39.       Width           =   3915
  40.    End
  41.    Begin Meter1 Meter 
  42.       BackColor       =   &H00FFFFFF&
  43.       ForeColor       =   &H00FF0000&
  44.       Height          =   330
  45.       Index           =   1
  46.       Inverse         =   0   'False
  47.       Left            =   630
  48.       Silent          =   0   'False
  49.       Top             =   1890
  50.       UnitsDone       =   0
  51.       UnitsTotal      =   32767
  52.       Width           =   3915
  53.    End
  54.    Begin Meter1 Meter 
  55.       BackColor       =   &H00FFFFFF&
  56.       ForeColor       =   &H00FF00FF&
  57.       Height          =   3240
  58.       Index           =   3
  59.       Inverse         =   0   'False
  60.       Left            =   4785
  61.       Silent          =   0   'False
  62.       Top             =   285
  63.       UnitsDone       =   0
  64.       UnitsTotal      =   32767
  65.       Width           =   495
  66.    End
  67.    Begin Label Label3 
  68.       Alignment       =   2  'Center
  69.       BorderStyle     =   1  'Fixed Single
  70.       Caption         =   "Label3"
  71.       Height          =   300
  72.       Left            =   2700
  73.       TabIndex        =   2
  74.       Top             =   1335
  75.       Width           =   690
  76.    End
  77.    Begin Label Label2 
  78.       Alignment       =   2  'Center
  79.       BorderStyle     =   1  'Fixed Single
  80.       Caption         =   "Label2"
  81.       Height          =   300
  82.       Left            =   1470
  83.       TabIndex        =   1
  84.       Top             =   1350
  85.       Width           =   690
  86.    End
  87.    Begin Label Label1 
  88.       BorderStyle     =   1  'Fixed Single
  89.       Caption         =   "  These Scroll Bars are different: they          provide INSTANT feedback.  Move the     thumb and watch the instant results on      our Meter controls and digital readout!"
  90.       Height          =   855
  91.       Left            =   660
  92.       TabIndex        =   0
  93.       Top             =   255
  94.       Width           =   3660
  95.    End
  96. End
  97. DefInt A-Z
  98.  
  99. Sub EHScroll1_Change ()
  100.     Call UpdateMeters
  101. End Sub
  102.  
  103. Sub EHScroll1_Changing ()
  104.     Call UpdateMeters
  105. End Sub
  106.  
  107. Sub Form_Load ()
  108.     For x = 1 To 3
  109.         Meter(x).UnitsDone = 0
  110.     Next x
  111.     Label2.caption = "0"
  112.     Label3.caption = "0%"
  113. End Sub
  114.  
  115. Sub Form_Paint ()
  116.     ConvexFrm ScrFrm, 4
  117.     ConcaveCtl Label1, 4
  118.     ConcaveCtl Label2, 5
  119.     ConcaveCtl Label3, 5
  120.  
  121.     For x = 1 To 3
  122.         ConcaveCtl Meter(x), 4
  123.     Next x
  124.  
  125.     CtlLabelOvr ScrFrm, Meter(1), "Normal"
  126.     CtlLabelOvr ScrFrm, Meter(2), "Inverse/Drain"
  127.     CtlLabelOvr ScrFrm, Meter(3), "Vert"
  128.  
  129. End Sub
  130.  
  131. Sub UpdateMeters ()
  132.     For x = 1 To 3
  133.         Meter(x).UnitsDone = EHScroll1.Value
  134.     Next x
  135.     Label2.caption = Format$(EHScroll1.Value)
  136.     Label3.caption = Format$((EHScroll1.Value / EHScroll1.Max), "00.0%")
  137. End Sub
  138.  
  139.